package com.sicau.socialpracticesystem.common.myenum;

/**
 * 团队申请进度枚举
 *
 * @author sxt
 * @version : 1.0.0
 */
public enum TeamMemberStateEnum {

    HAS_APPLIED(0, "已申请"),
    PASSED(1, "已通过"),
    DENIED(2, "已拒绝");

    TeamMemberStateEnum(Integer state, String progress) {
        this.state = state;
        this.progress = progress;
    }

    /**
     * 进度类型
     */
    private final Integer state;

    /**
     * 进度描述
     */
    private final String progress;


    public Integer getState() {
        return state;
    }


    public String getProgress() {
        return progress;
    }

    public static TeamMemberStateEnum getEnum(Integer state) {
        TeamMemberStateEnum[] collegeEnums = values();
        for (TeamMemberStateEnum collegeEnum : collegeEnums) {
            if (collegeEnum.getState().equals(state)) {
                return collegeEnum;
            }
        }
        return null;
    }
}
